package com.siyao.redvip.volley;

import java.util.HashMap;
import java.util.Map;

import com.android.volley.AuthFailureError;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.toolbox.StringRequest;

public class NStringRequest extends StringRequest {

	int method;
	String url;
	Response.Listener succListener;
	Response.ErrorListener errorListener;
	Map<String, String> pamers;
	
	/**
	 * post
	 * @param arg0
	 * @param arg1
	 * @param arg2
	 * @param arg3
	 * @param arg4
	 * @param arg5
	 */
	public NStringRequest( int method, String url, Response.Listener succListener, Response.ErrorListener errorListener, Map<String, String> arg5){
		super( method, url, succListener, errorListener);
	    this.pamers=arg5;
	  }
	
	/**
	 * get
	 * @param netRequest
	 * @param method
	 * @param url
	 * @param succListener
	 * @param errorListener
	 */
	public NStringRequest( int method, String url, Response.Listener succListener, Response.ErrorListener errorListener) {
	    super( method, url, succListener, errorListener);
	  }
	
	@Override
	protected Map<String, String> getParams() throws AuthFailureError {
		
		return pamers;
	}

	@Override
	public Map<String, String> getHeaders() throws AuthFailureError {
		Map<String, String> map = new HashMap<String, String>();
//		map.put("Content-Type", "text/html;charset=utf-8");
		return map;
	}
}
